3.490 \(\int \sqrt{g+h x} (a+b \log (c (d (e+f x)^p)^q))^2 \, dx\)

Optimal. Leaf size=547 \[ \frac{8 b^2 p^2 q^2 (f g-e h)^{3/2} \text{PolyLog}\left (2,1-\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}+\frac{8 b p q (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}-\frac{8 b p q \sqrt{g+h x} (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\frac{8 b^2 p^2 q^2 (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{64 b^2 p^2 q^2 (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}+\frac{16 b^2 p^2 q^2 (f g-e h)^{3/2} \log \left (\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right ) \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{3 f^{3/2} h}+\frac{64 b^2 p^2 q^2 \sqrt{g+h x} (f g-e h)}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h} \]

[Out]

(64*b^2*(f*g - e*h)*p^2*q^2*Sqrt[g + h*x])/(9*f*h) + (16*b^2*p^2*q^2*(g + h*x)^(3/2))/(27*h) - (64*b^2*(f*g -
e*h)^(3/2)*p^2*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]])/(9*f^(3/2)*h) - (8*b^2*(f*g - e*h)^(3/2)*
p^2*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]^2)/(3*f^(3/2)*h) - (8*b*(f*g - e*h)*p*q*Sqrt[g + h*x]
*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(3*f*h) - (8*b*p*q*(g + h*x)^(3/2)*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(9*h)
+ (8*b*(f*g - e*h)^(3/2)*p*q*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]*(a + b*Log[c*(d*(e + f*x)^p)^q])
)/(3*f^(3/2)*h) + (2*(g + h*x)^(3/2)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(3*h) + (16*b^2*(f*g - e*h)^(3/2)*p^2
*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]*Log[2/(1 - (Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h])])/(3
*f^(3/2)*h) + (8*b^2*(f*g - e*h)^(3/2)*p^2*q^2*PolyLog[2, 1 - 2/(1 - (Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h])]
)/(3*f^(3/2)*h)

________________________________________________________________________________________

Rubi [A]  time = 2.98267, antiderivative size = 547, normalized size of antiderivative = 1., number of steps used = 22, number of rules used = 16, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.533, Rules used = {2398, 2411, 2346, 63, 208, 2348, 12, 1587, 6741, 5984, 5918, 2402, 2315, 2319, 50, 2445} \[ \frac{8 b^2 p^2 q^2 (f g-e h)^{3/2} \text{PolyLog}\left (2,1-\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}+\frac{8 b p q (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}-\frac{8 b p q \sqrt{g+h x} (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\frac{8 b^2 p^2 q^2 (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{64 b^2 p^2 q^2 (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}+\frac{16 b^2 p^2 q^2 (f g-e h)^{3/2} \log \left (\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right ) \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{3 f^{3/2} h}+\frac{64 b^2 p^2 q^2 \sqrt{g+h x} (f g-e h)}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[g + h*x]*(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]

[Out]

(64*b^2*(f*g - e*h)*p^2*q^2*Sqrt[g + h*x])/(9*f*h) + (16*b^2*p^2*q^2*(g + h*x)^(3/2))/(27*h) - (64*b^2*(f*g -
e*h)^(3/2)*p^2*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]])/(9*f^(3/2)*h) - (8*b^2*(f*g - e*h)^(3/2)*
p^2*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]^2)/(3*f^(3/2)*h) - (8*b*(f*g - e*h)*p*q*Sqrt[g + h*x]
*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(3*f*h) - (8*b*p*q*(g + h*x)^(3/2)*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(9*h)
+ (8*b*(f*g - e*h)^(3/2)*p*q*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]*(a + b*Log[c*(d*(e + f*x)^p)^q])
)/(3*f^(3/2)*h) + (2*(g + h*x)^(3/2)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(3*h) + (16*b^2*(f*g - e*h)^(3/2)*p^2
*q^2*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h]]*Log[2/(1 - (Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h])])/(3
*f^(3/2)*h) + (8*b^2*(f*g - e*h)^(3/2)*p^2*q^2*PolyLog[2, 1 - 2/(1 - (Sqrt[f]*Sqrt[g + h*x])/Sqrt[f*g - e*h])]
)/(3*f^(3/2)*h)

Rule 2398

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 2348

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.))/(x_), x_Symbol] :> With[{u = IntHi
de[(d + e*x^r)^q/x, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[Dist[1/x, u, x], x], x]] /; FreeQ[{a, b
, c, d, e, n, r}, x] && IntegerQ[q - 1/2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1587

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*Log[RemoveConte
nt[Qq, x]])/(q*Coeff[Qq, x, q]), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]*D[Qq, x])/(q*Coeff[Q
q, x, q])]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

Rule 6741

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 5984

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*e*(p + 1)), x] + Dist[1/(c*d), Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \, dx &=\operatorname{Subst}\left (\int \sqrt{g+h x} \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2 \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{(4 b f p q) \int \frac{(g+h x)^{3/2} \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{e+f x} \, dx}{3 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{(4 b p q) \operatorname{Subst}\left (\int \frac{\left (\frac{f g-e h}{f}+\frac{h x}{f}\right )^{3/2} \left (a+b \log \left (c d^q x^{p q}\right )\right )}{x} \, dx,x,e+f x\right )}{3 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{(4 b p q) \operatorname{Subst}\left (\int \sqrt{\frac{f g-e h}{f}+\frac{h x}{f}} \left (a+b \log \left (c d^q x^{p q}\right )\right ) \, dx,x,e+f x\right )}{3 f},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{(4 b (f g-e h) p q) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{f g-e h}{f}+\frac{h x}{f}} \left (a+b \log \left (c d^q x^{p q}\right )\right )}{x} \, dx,x,e+f x\right )}{3 f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{(4 b (f g-e h) p q) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{\sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}} \, dx,x,e+f x\right )}{3 f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{\left (4 b (f g-e h)^2 p q\right ) \operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q x^{p q}\right )}{x \sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}} \, dx,x,e+f x\right )}{3 f^2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (8 b^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\left (\frac{f g-e h}{f}+\frac{h x}{f}\right )^{3/2}}{x} \, dx,x,e+f x\right )}{9 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}+\operatorname{Subst}\left (\frac{\left (8 b^2 (f g-e h) p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}}{x} \, dx,x,e+f x\right )}{9 f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (8 b^2 (f g-e h) p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}}{x} \, dx,x,e+f x\right )}{3 f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (4 b^2 (f g-e h)^2 p^2 q^2\right ) \operatorname{Subst}\left (\int -\frac{2 \sqrt{f} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g-\frac{e h}{f}+\frac{h x}{f}}}{\sqrt{f g-e h}}\right )}{\sqrt{f g-e h} x} \, dx,x,e+f x\right )}{3 f^2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{\left (8 b^2 (f g-e h)^{3/2} p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g-\frac{e h}{f}+\frac{h x}{f}}}{\sqrt{f g-e h}}\right )}{x} \, dx,x,e+f x\right )}{3 f^{3/2} h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (8 b^2 (f g-e h)^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}} \, dx,x,e+f x\right )}{9 f^2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (8 b^2 (f g-e h)^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{\frac{f g-e h}{f}+\frac{h x}{f}}} \, dx,x,e+f x\right )}{3 f^2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h)^{3/2} p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{x \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{f g-e h}}\right )}{e h+f \left (-g+x^2\right )} \, dx,x,\sqrt{g+h x}\right )}{3 \sqrt{f} h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h)^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{f g-e h}{h}+\frac{f x^2}{h}} \, dx,x,\sqrt{g+h x}\right )}{9 f h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h)^2 p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{f g-e h}{h}+\frac{f x^2}{h}} \, dx,x,\sqrt{g+h x}\right )}{3 f h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{64 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}-\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h)^{3/2} p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{x \tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{f g-e h}}\right )}{-f g+e h+f x^2} \, dx,x,\sqrt{g+h x}\right )}{3 \sqrt{f} h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{64 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}-\frac{8 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}+\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h) p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{f g-e h}}\right )}{1-\frac{\sqrt{f} x}{\sqrt{f g-e h}}} \, dx,x,\sqrt{g+h x}\right )}{3 f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{64 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}-\frac{8 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}+\frac{16 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}-\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h) p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (\frac{2}{1-\frac{\sqrt{f} x}{\sqrt{f g-e h}}}\right )}{1-\frac{f x^2}{f g-e h}} \, dx,x,\sqrt{g+h x}\right )}{3 f h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{64 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}-\frac{8 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}+\frac{16 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}+\operatorname{Subst}\left (\frac{\left (16 b^2 (f g-e h)^{3/2} p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{64 b^2 (f g-e h) p^2 q^2 \sqrt{g+h x}}{9 f h}+\frac{16 b^2 p^2 q^2 (g+h x)^{3/2}}{27 h}-\frac{64 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )}{9 f^{3/2} h}-\frac{8 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )^2}{3 f^{3/2} h}-\frac{8 b (f g-e h) p q \sqrt{g+h x} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f h}-\frac{8 b p q (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 h}+\frac{8 b (f g-e h)^{3/2} p q \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{3 f^{3/2} h}+\frac{2 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 h}+\frac{16 b^2 (f g-e h)^{3/2} p^2 q^2 \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}+\frac{8 b^2 (f g-e h)^{3/2} p^2 q^2 \text{Li}_2\left (1-\frac{2}{1-\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}}\right )}{3 f^{3/2} h}\\ \end{align*}

Mathematica [C]  time = 2.12411, size = 365, normalized size = 0.67 \[ \frac{2 \left (\frac{3 b^2 p^2 q^2 \sqrt{g+h x} \left (3 h (e+f x) \, _4F_3\left (-\frac{1}{2},1,1,1;2,2,2;\frac{h (e+f x)}{e h-f g}\right )+\log (e+f x) \left (\log (e+f x) \left (f h x \sqrt{\frac{f (g+h x)}{f g-e h}}+f g \left (\sqrt{\frac{f (g+h x)}{f g-e h}}-1\right )+e h\right )-3 h (e+f x) \, _3F_2\left (-\frac{1}{2},1,1;2,2;\frac{h (e+f x)}{e h-f g}\right )\right )\right )}{f \sqrt{\frac{f (g+h x)}{f g-e h}}}-\frac{2 b p q \left (\sqrt{f} \sqrt{g+h x} (3 f (g+h x) \log (e+f x)+6 e h-2 f (4 g+h x))+6 (f g-e h)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{f} \sqrt{g+h x}}{\sqrt{f g-e h}}\right )\right ) \left (-a-b \log \left (c \left (d (e+f x)^p\right )^q\right )+b p q \log (e+f x)\right )}{f^{3/2}}+3 (g+h x)^{3/2} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )-b p q \log (e+f x)\right )^2\right )}{9 h} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[g + h*x]*(a + b*Log[c*(d*(e + f*x)^p)^q])^2,x]

[Out]

(2*((3*b^2*p^2*q^2*Sqrt[g + h*x]*(3*h*(e + f*x)*HypergeometricPFQ[{-1/2, 1, 1, 1}, {2, 2, 2}, (h*(e + f*x))/(-
(f*g) + e*h)] + Log[e + f*x]*(-3*h*(e + f*x)*HypergeometricPFQ[{-1/2, 1, 1}, {2, 2}, (h*(e + f*x))/(-(f*g) + e
*h)] + (e*h + f*h*x*Sqrt[(f*(g + h*x))/(f*g - e*h)] + f*g*(-1 + Sqrt[(f*(g + h*x))/(f*g - e*h)]))*Log[e + f*x]
)))/(f*Sqrt[(f*(g + h*x))/(f*g - e*h)]) - (2*b*p*q*(6*(f*g - e*h)^(3/2)*ArcTanh[(Sqrt[f]*Sqrt[g + h*x])/Sqrt[f
*g - e*h]] + Sqrt[f]*Sqrt[g + h*x]*(6*e*h - 2*f*(4*g + h*x) + 3*f*(g + h*x)*Log[e + f*x]))*(-a + b*p*q*Log[e +
 f*x] - b*Log[c*(d*(e + f*x)^p)^q]))/f^(3/2) + 3*(g + h*x)^(3/2)*(a - b*p*q*Log[e + f*x] + b*Log[c*(d*(e + f*x
)^p)^q])^2))/(9*h)

________________________________________________________________________________________

Maple [F]  time = 0.72, size = 0, normalized size = 0. \begin{align*} \int \sqrt{hx+g} \left ( a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^(1/2)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)

[Out]

int((h*x+g)^(1/2)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(1/2)*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sqrt{h x + g} b^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + 2 \, \sqrt{h x + g} a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \sqrt{h x + g} a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(1/2)*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="fricas")

[Out]

integral(sqrt(h*x + g)*b^2*log(((f*x + e)^p*d)^q*c)^2 + 2*sqrt(h*x + g)*a*b*log(((f*x + e)^p*d)^q*c) + sqrt(h*
x + g)*a^2, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**(1/2)*(a+b*ln(c*(d*(f*x+e)**p)**q))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{h x + g}{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(1/2)*(a+b*log(c*(d*(f*x+e)^p)^q))^2,x, algorithm="giac")

[Out]

integrate(sqrt(h*x + g)*(b*log(((f*x + e)^p*d)^q*c) + a)^2, x)